﻿(function () {
    "use strict";
    var sanDiego = { 'title': 'sanDiego', 'values': [72, 70, 74, 72, 75, 76, 77, 78, 74, 72, 70, 68], 'color': 'green' };
    var kansasCty = { 'title': 'kansasCty', 'values': [20, 30, 40, 50, 60, 70, 80, 90, 70, 60, 50, 40], 'color': 'red' };
    var buffalo = { 'title': 'buffalo', 'values': [-10, -20, 0, 50, 50, 60, 90, 100, 50, 40, 30, 0], 'color': 'purple' };

    var BarChartDS = [{ 'title': 'Windows 7', 'value': 47 }, { 'title': 'Windows xp', 'value': 32, 'color': 'blue' }, { 'title': 'Windows 8', 'value': 10, 'color': 'green' }];

    var dataArray = [sanDiego, kansasCty, buffalo];

    var itemList = new WinJS.Binding.List(dataArray);
    var BarDataList = new WinJS.Binding.List(BarChartDS);
    // Create a namespace to make the data publicly
    // accessible. 
    var publicMembers =
        {
            itemList: itemList,
            BarChartDS: BarDataList,
            itemHeader: new WinJS.Binding.List(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])
        };
    WinJS.Namespace.define("DataExample", publicMembers);

})();